//
//  SFeedbackViewController.m
//  Gunz
//
//  Created by Joggy on 16/5/23.
//  Copyright © 2016年 NUPT. All rights reserved.
//

#import "SFeedbackViewController.h"
#import "GZConst.h"
#import "BarButtonView.h"

@interface SFeedbackViewController ()

@end

@implementation SFeedbackViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self prepareForNav];
    [self prepareForLayout];
}

- (void)prepareForNav {
    [super prepareForNav];
    self.title = @"应用反馈";
    //导航左按键
    UIImage *image = [UIImage imageNamed:@"all_back"];
    UIButton *leftBarButton = [UIButton buttonWithType:UIButtonTypeSystem];
    leftBarButton.frame = CGRectMake(0, 0, image.size.width, image.size.height);
    leftBarButton.layer.position = CGPointMake(22, 22);
    [leftBarButton setImage:[image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] forState:UIControlStateNormal];
    [leftBarButton addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftBarButton];
}

- (void)prepareForLayout {
    [super prepareForLayout];
    UILabel *tipLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, screenWidth - 44, 88)];
    tipLabel.text = @"如果您对我们的产品有建议或者意见，请反馈给我们，帮助我们改进应用，谢谢！";
    tipLabel.textColor = TEXT_DETAIL_COLOR;
    tipLabel.font = [UIFont systemFontOfSize:14];
    tipLabel.numberOfLines = 0;
    [tipLabel sizeToFit];
//    tipLabel.layer.position = CGPointMake(screenWidth/2, <#CGFloat y#>)
}

- (void)back {
    [self.navigationController popViewControllerAnimated:true];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
